package com.su.lesson03;

import java.awt.*;

public class testPaint {
    public static void main(String[] args) {
        new MyPaint().loadFrame();
    }
}
class MyPaint extends Frame  {
    public void loadFrame(){
        setBounds(200,200,600,500);
        setVisible(true);
    }
    @Override
    public void paint(Graphics g) {
        //画笔需要有颜色
        //画笔可以画画
        g.setColor(Color.red);
        g.drawOval(100,100,100,100);
        //g.fillOval(100,100,100,100);//实心的圆
        g.setColor(Color.green);
        g.fillRect(150,200,100,100);

    }
}